package com.example.menuvirtualclient.data;

import java.util.List;


/**
 * 
 * @author emaneff
 *
 * @param <T>
 * 			Entity type
 */
public interface IRepository<T> {
	/**
	 * 
	 * @return
	 */
	ISession Session();
	/**
     * 
     * @param entity
     */
    void Insert(T entity);
    /**
     * Update the entity
     * @param entity
     * 		Entity to updated
     * @return
     * 		True OK or False Error
     */
    boolean Update(T entity);
	/**
	 * Delete the entity
	 * @param entity
	 * 		Entity to deleted
	 * @return
	 * 		True OK or False Error
	 */
    boolean Delete(T entity);
    /**
     * Return Entity by Id
     * @param id
     * 		Identifier
     * @return
     * 		Entity
     */
    T Get(long id);
    /**
     * Return List of Entity
     * @return
     */
    List<T> GetAll();
    /**
     * 
     * @param query
     * @return
     */
    List<T> QueryList(String query, String[] args);   
    
}
